package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishFlavorMapper {
    void save(@Param("flavors")List<DishFlavor> flavors);
    void delete(@Param("ids") List<Long> ids);
    @Delete("delete from dish_flavor where dish_id = #{id}")
    void deleteById(long id);
    @Select("select * from dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> findAllByDishId(Long id);
}
